#ifndef MDS_IO_MDS_INCLUDED
#define MDS_IO_MDS_INCLUDED 1

#include "../frame.h"

/** \brief save frame info in gzip format */
/**
 *	\param filename output file name, should be something.gz
 *	\param frame a valid frame
 *	\param append if not zero, contents is appended to filename.
 */
int mds_file_save( const char *filename, const mds_frame *frame, Real t, int append);


/** \brief load the last frame of file */
/**
 *	\param filename input file name, in text or gzip format
 *	\param frame a frame created while loading, with 2 sets of vectors
 *	\param t pointer to the frame time.
 */
int mds_file_load( const char *filename, mds_frame *frame, Real *t);

int mds_file_load_and_apply( const char *filename, int (*proc)( const mds_frame *, Real t, void *args), void *args );




#endif
